<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/taglibs.jsp"%>
<html>
<head>
<title></title>
<link rel="stylesheet" type="text/css" href="${ctx}/styles/ec/ecside_style.css" />
<%@include file="/common/extjs.jsp" %>
<%@include file="/common/meta.jsp"%>
<%@include file="/common/validator.jsp"%>

</head>
<body>
<div class="x-panel" style="width: 100%">
<div class="x-panel-header">日志管理</div>
<div class="x-toolbar" style="width: 100%">
 <table width="100%">
     <tr>
        <td  align="right">
             &nbsp;
        </td>
     </tr>
 </table>
</div>
<div><%@ include file="/common/messages.jsp"%></div>
<div align="center" style="width: 100%">
	
	<fieldset style="width: 95%; padding:10px 10px 10px 10px;">
	<legend>查看日志</legend>
	<table width="100%" align="left" border="0">
		<tr height="30px">
			<td align="right" width="100">日志标题：</td>
			<td align="left" colspan="3">${model.title}
			</td>
		</tr>

		<tr height="30px">
			<td align="right">日志类型：</td>
			<td align="left">${model.diaryType.name}
				</td>
		</tr>
		<tr height="30px">
			<td align="right">日志时间：</td>
			<td align="left" colspan="3">${model.createDate}</td>
		</tr>
		<tr height="30px">
			<td align="right">最后修改：</td>
			<td align="left" colspan="3">${model.endDate}</td>
		</tr>
		<tr height="30px">
			<td align="right">内容：</td>
			<td align="left" colspan="3">
				${model.content}
				
			</td>
		</tr>
		<tr height="30px">
			<td align="right">日志附件：</td>
			<td  align="left">

			</td>
		</tr>
	</table>
	</fieldset>
	<table width="600px" style="margin-bottom: 10px;">
		<tr>
			<td style="text-align: center;">
			<input type="button" value="编辑" class="button" onclick="edit(${model.id});"/>
			
			 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			  <c:if test="${first eq 'Y'}">
			 <input type="button" value="上一篇"/>
		   	</c:if>
		   	<c:if test="${first eq 'N'}">
			 <input type="button" value="上一篇" class="button" onclick="upDown(${firstId});"/>
		   	</c:if>
			  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			   <c:if test="${last eq 'Y'}">
			 <input type="button" value="下一篇" />
		   	</c:if>
		   
		   	<c:if test="${last eq 'N'}">
			 <input type="button" value="下一篇" class="button" onclick="upDown(${lastId});"/>
		   	</c:if>
			  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			  <input type="button" value="返回" class="button" onclick="back();"/>
			</td>
		</tr>
	</table>
</div>
</div>

<script type="text/javascript">
  
  function back(){
	  window.location = "${ctx}/diary/index.do";
  }
  function upDown(id){
	  window.location = "${ctx}/diary/view.do?model.id=" + id;
	  }
  function edit(id){
	  window.location = "${ctx}/diary/edit.do?model.id="+id;
	  }
</script>
</body>
</html>